const TOKEN = 'TOKEN'
export const setToken = (token) => {
  localStorage.setItem(TOKEN, token)
}
export const getToken = () => {
  return localStorage.getItem(TOKEN)
}
export const removeToken = () => {
  localStorage.removeItem(TOKEN)
}
export const hasToken = () => {
  return !!getToken()
  // 双感叹号表示强制转换布尔, 取反再取反
}
